<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@include file="/includes.jsp"%>

<% String selectedTabValue = (String)session.getAttribute("selectedTabValue"); %>
<beans:define id="nodeId" name="nodeId" type="java.lang.Long"/>

<ul class="tabList">
<logic:iterate name="tabValues" id="tab">

    <beans:define id="selected" value="<%=String.valueOf(tab.equals(selectedTabValue))%>"/>

    <logic:equal name="selected" value="true">
        <li class="selected">
            <beans:write name="tab"/>
        </span>
    </logic:equal>
    
    <logic:notEqual name="selected" value="true">
        <li class="not-selected">
            <logic:equal name="tab" value="Change Log">
                <html:link action="showChangeLog.do" paramId="nodeId" paramName="nodeId">
                    <beans:write name="tab"/>
                </html:link>
            </logic:equal>
            <logic:notEqual name="tab" value="Change Log">
                <logic:equal name="tab" value="Logins">
                    <html:link action="showLogins.do" paramId="nodeId" paramName="nodeId">
                        <beans:write name="tab"/>
                    </html:link>
                </logic:equal>
                <logic:notEqual name="tab" value="Logins">
                    <logic:equal name="tab" value="Time">
                        <html:link action="showTime.do" paramId="nodeId" paramName="nodeId">
                            <beans:write name="tab"/>
                        </html:link>
                    </logic:equal>
                    <logic:notEqual name="tab" value="Time">
                        <logic:equal name="tab" value="Person Time">
                            <html:link action="personTimeLink.do" paramId="nodeId" paramName="nodeId">
                                <beans:write name="tab"/>
                            </html:link>
                        </logic:equal>
                        <logic:notEqual name="tab" value="Person Time">
                            <logic:equal name="tab" value="Group Access">
                                <html:link action="showGroupAccess.do" paramId="nodeId" paramName="nodeId">
                                    <beans:write name="tab"/>
                                </html:link>
                            </logic:equal>
                            <logic:notEqual name="tab" value="Group Access">
                                <logic:equal name="tab" value="My Access">
                                    <html:link action="showAccess.do" paramId="nodeId" paramName="nodeId">
                                        <beans:write name="tab"/>
                                    </html:link>
                                </logic:equal>
                                <logic:notEqual name="tab" value="My Access">
                                    <logic:equal name="tab" value="User Access">
                                        <html:link action="showUserAccess.do" paramId="nodeId" paramName="nodeId">
                                            <beans:write name="tab"/>
                                        </html:link>
                                    </logic:equal>
                                    <logic:notEqual name="tab" value="User Access">
                                        <logic:equal name="tab" value="Links">
                                            <html:link action="showNodeLinks.do" paramId="nodeId" paramName="nodeId">
                                                <beans:write name="tab"/>
                                            </html:link>
                                        </logic:equal>
                                        <logic:notEqual name="tab" value="Links">
                                            <logic:equal name="tab" value="Gantt">
                                                <html:link action="showGanttChart.do" paramId="nodeId" paramName="nodeId">
                                                    <beans:write name="tab"/>
                                                </html:link>
                                            </logic:equal>
                                            <logic:notEqual name="tab" value="Gantt">
                                                <logic:equal name="tab" value="BurnDown">
                                                    <html:link action="showBurnDown.do" paramId="nodeId" paramName="nodeId">
                                                        <beans:write name="tab"/>
                                                    </html:link>
                                                </logic:equal>
                                                <logic:notEqual name="tab" value="BurnDown">
                                                    <logic:equal name="tab" value="Time Report">
                                                        <html:link action="showSprintTimeReport.do" paramId="nodeId" paramName="nodeId">
                                                            <beans:write name="tab"/>
                                                        </html:link>
                                                    </logic:equal>
                                                    <logic:notEqual name="tab" value="Time Report">
                                                        <logic:equal name="tab" value="Unplanned">
                                                            <html:link action="showSprintUnplannedReport.do" paramId="nodeId" paramName="nodeId">
                                                                <beans:write name="tab"/>
                                                            </html:link>
                                                        </logic:equal>
                                                        <logic:notEqual name="tab" value="Unplanned">
                                                            <html:link action="showNode.do" paramId="nodeId" paramName="nodeId">
                                                                <beans:write name="tab"/>
                                                            </html:link>
                                                        </logic:notEqual>
                                                    </logic:notEqual>
                                                </logic:notEqual>
                                            </logic:notEqual>
                                        </logic:notEqual>
                                    </logic:notEqual>
                                </logic:notEqual>
                            </logic:notEqual>
                        </logic:notEqual>
                    </logic:notEqual>
                </logic:notEqual>
            </logic:notEqual>
        </li>
    </logic:notEqual>

</logic:iterate>
</ul>
